Created: 2022-07-29
Tags: #fleeting
Retrieves data from SQL database
Often refered to as queries. query in sql explained
Think of SQL table as a type of an entity (ie. Dogs),
each row in SQL table as a specific instance of that type (pug, bulldog, etc...)
each columns represents common properties shared by all instances of that entity (ie. Color of fur, length of tail, etc).
SELECT *
FROM movies;
translates to
SELECT "all_columns"
FROM "the table named movies";
The * means all columns
Result of this query will be\
A copy of table, but only with columns that we requested.
SELECT director, title
FROM movies;`
translates to
SELECT "director column and title column"
FROM "the table named MOVIES"`